import request from '../utils/request';

export function getTgInfoListForApp(params) {
  return request({
    url: '/adviser/list',
    method: 'get',
    params,
  });
}

export function getUserTgList(params) {
  return request({
    url: '/adviser/user',
    method: 'get',
    params,
  });
}

export function getTgRecommendList(params) {
  return request({
    url: '/adviser/recommend/list',
    method: 'get',
    params,
  });
}

export function getTgDetail(id) {
  return request({
    url: `/adviser/${id}`,
    method: 'get',
  });
}

export function followTg(id, isFollow) {
  return request({
    url: `/adviser/follow/${id}`,
    method: 'post',
    data: {
      isFollow,
    },
  });
}
